import time

end=10
pre=time.time()
while (cur:=time.time()-pre)<end:
    time.sleep(1)
